import request from "@/utils/request";
// 查询车辆列表数据
export function queryVehicleRealData(id: number, params: any) {
  return request({
    url: `/books/${id}`,
    method: "get",
    params,
  });
}
// 获取车辆列表数据
export function getVehicleRealData(params: any) {
  return request({
    url: "/books",
    method: "get",
    params,
  });
}
// 新建车辆数据
export function addVehicleData(data: any) {
  return request({
    url: "/books",
    method: "post",
    data,
  });
}
// 修改车辆数据
export function editVehicleData(id: number, data: any) {
  return request({
    url: `/books/${id}`,
    method: "put",
    data,
  });
}

// 删除车辆数据
export function deleteVehicleData(id: number) {
  return request({
    url: `/books/${id}`,
    method: "delete",
  });
}
// 获取车辆列表数据
export function updateGUI(id: number, params: any) {
  return request({
    url: `/gui/${id}`,
    method: "get",
    params,
    timeout: 50000,
  });
}

// 流量管理
export function flowGUI() {
  return request({
    url: `/xmlGui`,
    method: "get",
    params:{},
  });
}